package com.itheima.mapper;

import com.itheima.pojo.Emp;
import com.itheima.pojo.PageResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface EmpMapper {
   /* @Select("select count(*) from emp")
    Long findTotal();
@Select("select emp.*,dept.name deptName from emp left join dept on emp.dept_id = dept.id limit #{jump},#{pageSize}")
    List<Emp> findAll(@Param("jump") Integer jump,@Param("pageSize") Integer pageSize);*/

    void delete(List<Integer> ids);


    /*@Select("select emp.*,dept.name deptName from emp left join dept on emp.dept_id = dept.id ")
    List<Emp> findPage();*/

    List<Emp> findPage(@Param("name") String name ,@Param("gender") Integer gender ,@Param("begin") LocalDate begin ,@Param("end") LocalDate end);

    void add(Emp emp);
}
